package net.torbenvoltmer.vepa.dummy;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.torbenvoltmer.vepa.Shared.*;

/**
 * Helper class for providing sample content for user interfaces created by
 * Android template wizards.
 * <p>
 *
 */
public class DummyContent {

    /**
     * An array of sample (dummy) items.
     */
    public static List<VepaPDF> ITEMS = new ArrayList<VepaPDF>();

    /**
     * A map of sample (dummy) items, by ID.
     */
    public static Map<Integer, VepaPDF> ITEM_MAP = new HashMap<Integer, VepaPDF>();

    static {
        // Add 3 sample items.
        /*
        addItem(new DummyItem("1", "Item 1"));
        addItem(new DummyItem("2", "Item 2"));
        addItem(new DummyItem("3", "Item 3"));*/
    }

    private static void addItem(VepaPDF item) {
        ITEMS.add(item);
        ITEM_MAP.put(item.Info.Version, item);
    }



    /**
     * A dummy item representing a piece of content.
     */
    public static class DummyItem {
        public String id;
        public String content;

        public DummyItem(String id, String content) {
            this.id = id;
            this.content = content;
        }

        @Override
        public String toString() {
            return content;
        }
    }

}
